#ifndef WF_DRAWCIRCLE_H
#define WF_DRAWCIRCLE_H

#include "pf_previewactioninterface.h"
#include "pf_circle.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw 
 * circles with a given center and a point on the circle line.
 */
class GUI_EXPORT WF_DrawCircle : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetCenter,       /**< Setting the center point. */
        SetRadius        /**< Setting the radius. */
    };

public:
    WF_DrawCircle(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_DrawCircle();
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);
	
	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionDrawCircle;
	}

    void reset();

    virtual void init(int status=0);
	
    virtual void trigger();
	
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
	virtual PF_StringList getAvailableCommands();
	
    virtual void hideOptions();
    virtual void showOptions();
	
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    /**
     * Circle data defined so far.
     */
    PF_CircleAttribute data;
};

#endif
